<template>
  <transition> <!-- 动画效果 -->
    <slot></slot> <!-- 外部组件的插槽【transition包裹了哪个组件就是哪个组件】 -->
  </transition>
</template>

<script>
export default {
  name: 'FadeAnimation'
}
</script>

<style lang="stylus" scoped>
  //淡入淡出的效果
  .v-enter, .v-leave-to
      opacity: 0
  .v-enter-active, .v-leave-active
      transition: opacity .5s
</style>
